package models

import "gorm.io/gorm"

type UserRequest struct {
	Username   string `json:"username" binding:"required,min=6,max=15" field_error_info:"用户名不正确"`
	Password   string `json:"password" binding:"required" field_error_info:"密码应包含数字、大小写字母、特殊字符中的3种, 且至少8个字符"`
	RePassword string `json:"re_password" binding:"required,eqfield=Password" field_error_info:"密码不一致"`
	UserId     int64  `json:"user_id"`
}

type User struct {
	gorm.Model
	UserId   int64  `json:"user_id"`
	Username string `json:"username"`
	Password string `json:"password"`
	Email    string `json:"email"`
	Gender   uint8  `json:"gender"`
}

type UserBankList struct {
	Id       int               `json:"id"`
	Username string            `json:"username"`
	UserBank []UserBankRespone `json:"user_bank" gorm:"foreignKey:UserId"`
}

type UserTagList struct {
	Id       int    `json:"id"`
	Username string `json:"username"`
	TagName  string `json:"tag_name"`
}
